package com.mm.cloth.model.request;

import com.google.gson.annotations.SerializedName;

/**
 * 分类请求模型
 * 对应服务器端的CategoryRequest
 */
public class CategoryRequest {
    @SerializedName("name")
    private String name;

    @SerializedName("icon")
    private String icon;

    @SerializedName("parentId")
    private Integer parentId;

    @SerializedName("sortOrder")
    private Integer sortOrder;

    public CategoryRequest() {
        this.sortOrder = 0;
    }

    public CategoryRequest(String name) {
        this.name = name;
        this.sortOrder = 0;
    }

    public CategoryRequest(String name, String icon, Integer parentId, Integer sortOrder) {
        this.name = name;
        this.icon = icon;
        this.parentId = parentId;
        this.sortOrder = sortOrder != null ? sortOrder : 0;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public Integer getSortOrder() {
        return sortOrder;
    }

    public void setSortOrder(Integer sortOrder) {
        this.sortOrder = sortOrder;
    }
}
